package cn.wolfcode.luowowo.search.service.impl;

import cn.wolfcode.luowowo.search.repository.DestinationEsRepository;
import cn.wolfcode.luowowo.search.service.IDestinationEsService;
import cn.wolfcode.luowowo.search.template.DestinationTemplate;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class DestinationEsServiceImpl implements IDestinationEsService {

    @Autowired
    private DestinationEsRepository destinationEsRepository;

    @Override
    public void saveOrUpdate(DestinationTemplate template) {
        destinationEsRepository.save(template);
    }

    @Override
    public DestinationTemplate findByName(String name) {
        return destinationEsRepository.findByName(name);
    }
}